home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 July / macformat-026.iso / mac / Shareware City / Developers / berkeleydb1.73 / Berkeley_db / PORT / Makefile < prev   
Encoding:
Makefile  |  1994-12-31  |  4.4 KB  |  153 lines  |  [TEXT/MPS ]

  1. #    @(#)Makefile    8.1 (Berkeley) 6/2/93
  2. #
  3. # MPW version Matthias Neeracher <neeri@iis.ee.ethz.ch>
  4. #
  5.  
  6. #
  7. # Destinations
  8. #
  9.  
  10. LibDBCIncludes            =    {CIncludes}
  11. LibDB68KCLibraries    =    {CLibraries}
  12. LibDBPPCCLibraries    =    {PPCLibraries}
  13.  
  14. #
  15.  
  16. OBJ1=    bt_close.c.o bt_conv.c.o bt_debug.c.o bt_delete.c.o bt_get.c.o bt_open.c.o ∂
  17.     bt_overflow.c.o bt_page.c.o bt_put.c.o bt_search.c.o bt_seq.c.o bt_split.c.o ∂
  18.     bt_stack.c.o bt_utils.c.o
  19. OBJ2=    db.c.o
  20. OBJ3=    hash.c.o hash_bigkey.c.o hash_buf.c.o hash_func.c.o hash_log2.c.o hash_page.c.o ∂
  21.     hsearch.c.o ndbm.c.o
  22. OBJ4=    mpool.c.o
  23. OBJ5=    rec_close.c.o rec_delete.c.o rec_get.c.o rec_open.c.o rec_put.c.o rec_search.c.o ∂
  24.     rec_seq.c.o rec_utils.c.o
  25. MISC=snprintf.c.o
  26.  
  27. PPC_OBJ1=    bt_close.c.o.PPC bt_conv.c.o.PPC bt_debug.c.o.PPC bt_delete.c.o.PPC bt_get.c.o.PPC bt_open.c.o.PPC ∂
  28.     bt_overflow.c.o.PPC bt_page.c.o.PPC bt_put.c.o.PPC bt_search.c.o.PPC bt_seq.c.o.PPC bt_split.c.o.PPC ∂
  29.     bt_stack.c.o.PPC bt_utils.c.o.PPC
  30. PPC_OBJ2=    db.c.o.PPC
  31. PPC_OBJ3=    hash.c.o.PPC hash_bigkey.c.o.PPC hash_buf.c.o.PPC hash_func.c.o.PPC hash_log2.c.o.PPC hash_page.c.o.PPC ∂
  32.     hsearch.c.o.PPC ndbm.c.o.PPC
  33. PPC_OBJ4=    mpool.c.o.PPC
  34. PPC_OBJ5=    rec_close.c.o.PPC rec_delete.c.o.PPC rec_get.c.o.PPC rec_open.c.o.PPC rec_put.c.o.PPC rec_search.c.o.PPC ∂
  35.     rec_seq.c.o.PPC rec_utils.c.o.PPC
  36. PPC_MISC=snprintf.c.o.PPC
  37.  
  38. #
  39. # PowerPC Libraries…
  40. #
  41.  
  42. PPCLibs =                                             ∂
  43.         "{PPCLibraries}"GUSI.xcoff                ∂
  44.         "{PPCLibraries}"InterfaceLib.xcoff    ∂
  45.         "{PPCLibraries}"StdCLib.xcoff            ∂
  46.         "{PPCLibraries}"CPlusLib.o                ∂
  47.         "{PPCLibraries}"StdCRuntime.o            ∂
  48.         "{PPCLibraries}"PPCToolLibs.o            ∂
  49.         "{PPCLibraries}"PPCCRuntime.o
  50.  
  51. #
  52. # … and how the shared ones have to be renamed.
  53. #
  54.  
  55. PPCLibEqu =                                                     ∂
  56.         -l "GUSI.xcoff=GUSI#0x01508000-0x01508000"     ∂
  57.         -l InterfaceLib.xcoff=InterfaceLib                 ∂
  58.       -l StdCLib.xcoff=StdCLib
  59.  
  60. #
  61. # 68K debugging options
  62. #
  63.  
  64. Debug68K                =    -sym on -mbg on
  65.  
  66. #
  67. # PowerPC debugging options. Note that -sym on disables optimization!
  68. #
  69.  
  70. DebugPPC                =    -sym on
  71.  
  72. #
  73. # PowerPC optimization options. Note that -sym on above disables optimization!
  74. #
  75.  
  76. PPCCOpt                =    -opt local
  77.  
  78. #
  79. # Tool options
  80. #
  81.  
  82. DBInc                    =    -i : -i :include -i {DepDir}
  83. COptions             =     -r {DBInc} {Debug68K} -d __STDC__ -s {DepDir}
  84. CPlusOptions         =     -mf {DBInc} {Debug68K}
  85. PPCCExt                =    -d macintosh -appleext on
  86. PPCCOptions         =  -shared_lib_export on {PPCCOpt} {PPCCExt} {DBInc} {DebugPPC}
  87. LOptions                =     -sym on -mf -w
  88. ROptions             =     -i :
  89.  
  90. #
  91. # Default Build Rules
  92. #
  93.  
  94. : ƒ ::btree: ::db: ::hash: ::mpool: ::recno: :clib:
  95.  
  96. .c.o            ƒ    .c
  97.     {C} {COptions} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
  98. .c.o.PPC        ƒ    .c
  99.     PPCC {PPCCOptions} {DepDir}{Default}.c -o {TargDir}{Default}.c.o.PPC
  100.  
  101.  
  102. # If you don't have memmove(3), add memmove.o to the MISC line.
  103. #
  104. # If you don't have mktemp(3) or mkstemp(3), add mktemp.o to the MISC line.
  105. #
  106. # If realloc(3) of a NULL pointer on your system isn't the same as
  107. # a malloc(3) call, add realloc.o to the MISC line.
  108. #
  109. # If you don't have snprintf/vsnprintf(3), add snprintf.o to the MISC line.
  110. # Note, this depends you your having vsprintf(3) -- if you don't, there's
  111. # no workaround other than changing the source code to not use the snprintf
  112. # calls.  If you have to make that change, check to see if your vsprintf
  113. # returns a length or a char *; if it's the latter, set VSPRINTF_CHARSTAR
  114. # in the include/compat.h file.
  115.  
  116. LibDB.o ƒ {OBJ1} {OBJ2} {OBJ3} {OBJ4} {OBJ5} {MISC}
  117.     Lib -sym on -o LibDB.o {OBJ1} {OBJ2} {OBJ3} {OBJ4} {OBJ5} {MISC} 
  118.  
  119. LibDB.xcoff    ƒ    {PPC_OBJ1} {PPC_OBJ2} {PPC_OBJ3} {PPC_OBJ4} {PPC_OBJ5} {PPC_MISC}
  120.     PPCLink -xm sharedLibrary {PPC_OBJ1} {PPC_OBJ2} {PPC_OBJ3} {PPC_OBJ4} {PPC_OBJ5} {PPC_MISC} {PPCLibs} ∂
  121.         -export `:DBExport ≈.x` -sym on -o LibDB.xcoff
  122.     MakeSym -i ::btree: -i ::db: -i ::hash: -i ::mpool: -i ::recno: -i :clib: -cttes LibDB.xcoff
  123.     
  124. LibDB            ƒƒ    LibDB.xcoff
  125.     MakePEF LibDB.xcoff -ft 'shlb' -fc 'cfrg'  -o LibDB {PPCLibEqu} ∂
  126.         -c 0x01738000 -d 0x01738000 -u 0x01738000
  127.     
  128. LibDB            ƒƒ DBCfrg.r
  129.     Rez DBCfrg.r -a -o LibDB
  130.  
  131. LibDB.68K    ƒ    LibDB.o
  132. LibDB.PPC    ƒ    LibDB
  133. LibDB.Both    ƒ    LibDB.68K LibDB.PPC
  134.  
  135. installƒ
  136.     Set OldExit {Exit}
  137.     Set Exit 0
  138.     Begin
  139.         Backup -a LibDB.o -to "{LibDB68KCLibraries}"
  140.         Backup -a                 ∂
  141.             :include:db.h        ∂
  142.             :include:mpool.h    ∂
  143.             :include:ndbm.h    ∂
  144.                                 -to "{LibDBCIncludes}"
  145.         Backup -a LibDB LibDB.xcoff -to "{LibDBPPCCLibraries}"    
  146.     End > InstallDB
  147.     Set Exit {OldExit}
  148.     InstallDB
  149.     delete InstallDB
  150.     
  151. cleanƒ
  152.     safedel {OBJ1} {OBJ2} {OBJ3} {OBJ4} {OBJ5} {MISC} {PPC_OBJ1} {PPC_OBJ2} {PPC_OBJ3} {PPC_OBJ4} {PPC_OBJ5} {PPC_MISC}
  153.